// @ts-ignore
/* eslint-disable */
import { api } from "@/utils/api";

/** 新增生产-标准化数据 POST /proStandardization/add */
export async function proStandardizationAdd(
  body: BIZAPI.ProStandardizationCreateReq,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultVoid>;

export async function proStandardizationAdd(
  body: BIZAPI.ProStandardizationCreateReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultVoid>>;

export async function proStandardizationAdd(
  body: BIZAPI.ProStandardizationCreateReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultVoid>;

export async function proStandardizationAdd(
  body: BIZAPI.ProStandardizationCreateReq,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultVoid>(`/app/proStandardization/add`, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
      tupleResponse: true,
    });
  }

  return api<BIZAPI.IResultVoid>(`/app/proStandardization/add`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 删除生产-标准化数据 POST /proStandardization/delete */
export async function proStandardizationDelete(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultVoid>;

export async function proStandardizationDelete(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultVoid>>;

export async function proStandardizationDelete(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultVoid>;

export async function proStandardizationDelete(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultVoid>(`/app/proStandardization/delete`, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
      tupleResponse: true,
    });
  }

  return api<BIZAPI.IResultVoid>(`/app/proStandardization/delete`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 获取生产-标准化数据 POST /proStandardization/get */
export async function proStandardizationGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultProStandardizationEntity>;

export async function proStandardizationGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultProStandardizationEntity>>;

export async function proStandardizationGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultProStandardizationEntity>;

export async function proStandardizationGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultProStandardizationEntity>(
      `/app/proStandardization/get`,
      {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
        },
        data: body,
        ...(options || {}),
        tupleResponse: true,
      }
    );
  }

  return api<BIZAPI.IResultProStandardizationEntity>(
    `/app/proStandardization/get`,
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    }
  );
}

/** 获取生产-标准化分页数据 POST /proStandardization/page */
export async function proStandardizationPage(
  body: BIZAPI.ProStandardizationQuery,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultIPageProStandardizationEntity>;

export async function proStandardizationPage(
  body: BIZAPI.ProStandardizationQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultIPageProStandardizationEntity>>;

export async function proStandardizationPage(
  body: BIZAPI.ProStandardizationQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultIPageProStandardizationEntity>;

export async function proStandardizationPage(
  body: BIZAPI.ProStandardizationQuery,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultIPageProStandardizationEntity>(
      `/app/proStandardization/page`,
      {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
        },
        data: body,
        ...(options || {}),
        tupleResponse: true,
      }
    );
  }

  return api<BIZAPI.IResultIPageProStandardizationEntity>(
    `/app/proStandardization/page`,
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    }
  );
}

/** 更新生产-标准化数据 POST /proStandardization/update */
export async function proStandardizationUpdate(
  body: BIZAPI.ProStandardizationUpdateReq,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultVoid>;

export async function proStandardizationUpdate(
  body: BIZAPI.ProStandardizationUpdateReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultVoid>>;

export async function proStandardizationUpdate(
  body: BIZAPI.ProStandardizationUpdateReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultVoid>;

export async function proStandardizationUpdate(
  body: BIZAPI.ProStandardizationUpdateReq,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultVoid>(`/app/proStandardization/update`, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
      tupleResponse: true,
    });
  }

  return api<BIZAPI.IResultVoid>(`/app/proStandardization/update`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}
